﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Shield : Entity {
    
    private Transform transForm;//获取自身transform
                                // Use this for initialization
    void Start() {
        transForm = this.transform;
        //if (GameManager.Instance.Sui.transform != null)
        //{
        //    transForm.SetParent(GameManager.Instance.Sui.transform);
        //    transForm.position = GameManager.Instance.Sui.GetComponent<Transform>().position + new Vector3(0, -0.2f, 0.05f);
        //}
        
        if (GameManager.Instance.Sui.transform != null)
        {
            transForm.Rotate(new Vector3(0,90,0));
            transForm.SetParent(GameManager.Instance.Sui.transform);
            transForm.position = GameManager.Instance.Sui.GetComponent<Transform>().position + new Vector3(0, -0.2f, 0.05f);
        }
    }
	// Update is called once per frame
	void Update () {
		
	}
    private void OnTriggerEnter(Collider other)
    {
        print(other.name);
    }
}
